﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CadastroProdutora.aspx.cs" Inherits="SFsoftSite.Cadastros.CadastroProdutora" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <h1 style = "padding-left: 30px">
        Cadastro de Produtoras
    </h1>

    <br />

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table align="center">
                <tr>
                    <td>
                        Nome da produtora:                
                    </td>
                    <td>
                        <asp:TextBox ID="txtNomeProdutora" MaxLength="50" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Button ID="btnCadastrar" runat="server" Text="Cadastrar" OnClick="btnCadastrar_Click" />
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <table align="center">
                <tr>
                    <td>
                        <asp:GridView ID="GridView1" runat="server" DataKeyNames="ID" 
                            AutoGenerateColumns="False" OnRowEditing="EditRecord" 
                            OnRowCancelingEdit="CancelRecord" OnRowUpdating="UpdateRecord"
                        OnRowDeleting="DeleteRecord">
                            <Columns>
                                <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="true" />
                                <asp:TemplateField HeaderText="Nome da Produtora">
                                    <ItemTemplate>
                                        <%# Eval("Nome")%>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtProdutora" runat="server" Text='<%# Eval("Nome") %>' Columns="50"></asp:TextBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ButtonType="Button" ShowDeleteButton="true" ShowEditButton="true" EditText="Editar" DeleteText="Deletar" UpdateText="Atualizar" CancelText="Cancelar" />
                            </Columns>
                        </asp:GridView>
                        <asp:SqlDataSource ID="SFGameStoreBD" runat="server"></asp:SqlDataSource>
                    </td>
                </tr>
            </table>
    <br />
    <br />
        </ContentTemplate>
    </asp:UpdatePanel>
 

</asp:Content>
